extends ./layouts/main

block content
	form(id='form')
		input(type='text' name='userName' id='user')
		input(type='password' name='password' id='pwd')
		input(type='submit' value='修改密码')
	script.
		$('#form').on('submit',function (evt) {
			evt.preventDefault();
			$.ajax({
				url:'/user/forget',
				method:'POST',
				data:{
					userName:$('#user').val(),
					password:$('#pwd').val()
				},
				dataType:'json',
				success:function (data) {
					console.log(data)
				}
			})
		})